#include<stdio.h>
#include<string.h>

int my_strcmp(const char *str1,const char *str2)
{
    while(*str1==*str2)
    {
        if(*str1=='\0')
        {
            return 0;
        }
        str1++;
        str2++;
    }
    if(*str1>*str2)
    {
        return 1;
    }
    else
    {
        return -1;
    }
}


int main()
{
    char *p1 = "abcdef";
    char *p2 = "abpdawdda";
    int ret  = my_strcmp(p1,p2);
    if(ret>0)
    {
        printf("p1>p2");
    }
    else if(ret<0)
    {
        printf("p1<p2");
    }
    else
    {
        printf("p1==p2");
    }
    return 0;
}